// 1.声明一个混入对象
let myMixin = {
  data() {
    return {
      msg: '我是混入对象的数据',
      cart: [
        {name: 'iphone', price: 6000},
        {name: 'huawei', price: 6500},
      ]
    }
  },
  created() {
    console.log('myMixin:', this.msg);
  },
  methods: {
    show() {
      console.log('myMixin:', '按钮被点击了');
    }
  },
}

export default myMixin